
<#include "/base/common/head.html"/>


 <div class="easyui-panel addPage multiple" data-options="fit:true,border:false,novalidate:true">
    <form class="easyui-form" id="ff" method="post" data-options="novalidate:true">
        <table class="table1">
            <tr>
           		<th><span>系统标识</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="system" id="system" value="" data-options="required:true,fit: true"></input></div>
           		</td>
           		
            </tr>
            <tr>
           		<th><span>编号</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="code" id="code" value="" data-options="required:true,fit: true"></input></div>
           		</td>
            </tr>
            <tr>
           		<th><span>名称</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="name" id="name" value="" data-options="required:true,fit: true"></input></div>
           		</td>
            </tr>
            <tr>
           		<th><span>参数值</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="value" id="value" value="" data-options="required:true,fit: true"></input></div>
           		</td>
            </tr>
            <tr>
           		<th><span>分组</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="group" id="group" value="" data-options="fit: true"></input></div>
           		</td>
            </tr>
            <tr>
           		<th><span>编辑器</span></th>
               	<td>
               		<div class="wrap_input"><input class="easyui-textbox" type="text" name="editor" id="editor" value="text" data-options="required:true,fit: true"></input></div>
           		</td>
            </tr>
          
        </table>
    </form>
</div>
<script>
top.window.subPage.save = save;
function save() {
	if($("#ff").form('enableValidation').form('validate')) {
		$.post("add", getParam(), function(data) {
			if("01" == data.code){//成功
				top.window.closeWindow(); //关闭窗口
				top.window.subPage.loadCurrDatagrid(); //回调方法
				showMsg(data.msg); //显示消息
				
			}else if("04" == data.code){//失败
				showErrorMsg(data.msg); //显示错误消息
			}
			
		});
		
	}
}
function getParam() {
	var param = {
       		"obj.code": getInputValue("code"), 
       		"obj.name": getInputValue("name"), 
       		"obj.system": getInputValue("system"), 
       		"obj.value": getInputValue("value"), 
       		"obj.group": getInputValue("group"), 
       		"obj.editor": getInputValue("editor")
	}
	for(key in param) {
		if(!param[key]) {
			delete param[key];
		}
	}
	return param;
}

</script>
<#include "/base/common/foot.html"/>
